# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  include AuthenticatedSystem
  
  layout 'main'
  
  helper :all # include all helpers, all the time
  
  before_filter :init_page

  # See ActionController::RequestForgeryProtection for details
  # Uncomment the :secret if you're not using the cookie session store
  protect_from_forgery :secret => 'efdb2ceeb9831928dba73a2ddf435848'
  
  private
  def check_if_logged
    unless logged_in?
      redirect_to login_url
      return false
    end
  end
  
  def init_page
    @title = 'Jewel Case'
  end
end
